<extend name="Base/common"/>
<block name="body">
    <div class="insurance">
        <div class="width1000">
            <img src="__PUBLIC__/Home/images/insurance1.png" alt="广告" class="ins_ad_img" />
            <div class="ins_tab">
                <a href="javascript:void(0);" class="f_l ins_tab_li">定制我的车险</a>
                <a href="try_count.html" class="f_l">试算我的保费</a>
            </div>
            <form action="{:U('step4')}" method="post" class="form_all" id="forms">
                <input type="hidden" name="c_order_no" value="{$c_order_no}">
                <input type="hidden" name="t_insrnc_bgn_tm" value="{$t_insrnc_bgn_tm}">
            <volist name="kindlist" id="kind">
                <div class="clearfix ins_select_list">
                    <div class="span1 f_l t_c">
                        <input type="checkbox" name="c_kind_cde[]" value="{$kind.C_KIND_CDE}" <eq name='kind.C_INSRNC_FLAG' value='1'>checked</eq> />
                    </div>
                    <div class="span2 f_l relative">
                        <span>{$kind.C_KIND_NAME}</span>
                        <span class="ins_help" title="详情"></span>
                        <div class="ins_detail" style="display: none;">
                            <p class="ins_detail_tit">{$kind.C_KIND_NAME}</p>
                            <p>{$kind.C_DESC}</p>
                        </div>
                    </div>
                    <div class="span1 f_l">
                        类型:{$kind.C_AMT_FLAG}
                    </div>
                    <div class="span4 f_l select_label ins_detail_label">
                        保险金额：<input type="text" name="n_amt[]" value="{$kind.N_DEFAULT_AMT}" />
                        座位数:<input type="text" name="n_seat_num[]" value="{$kind.N_SEAT_NUM}" />
                        保险费:<input type="text" name="n_kind_prem[]" value="{$kind.N_KIND_PREM}" /> 
                    </div>
                    <div class="span2 f_l">
                       <p class="ins_select_pad">{$kind.C_AMT_LIST}</p>
                    </div>
                </div>
            </volist>
                <input type="submit" value="下一步" class="form_submit" />
            </form>
        </div>
    </div>
    </block>
<block name="script">
<script type="text/javascript" src="__PUBLIC__/Home/js/insurance.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/carCommen.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/datePicker.js"></script>
<script type="text/javascript">
    /*时间控件*/
    $(function(){
        $(".datePicker").each(function(){
            $(this).datepicker({
                format: "yyyy-mm-dd",
                todayBtn: "linked",
                language: "zh-CN",
                autoclose: true,
                todayHighlight: true
            });
        }); 
    });
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#forms').validate({
            rules: {
                car_type: "required",
                shortName_: "required"
            },
            messages: {
                car_type: "请选择车辆类型" ,
                shortName_: "请填写商品名称简写",
            },  
            showErrors: function(errorMap, errorList) { 
                $.each( errorList, function(i,v){
                    if(v.message!=""){ 
                        $(this.element).parent().parent().addClass('has_error');
                        $(this.element).nextAll(".help_msg").html(v.message);
                    }
                });  
            },
            /* 失去焦点时不验证 */
            onfocusout: false
        });
        $('#form1').find('input,select,textarea').on('change',function(){ 
            $(this).parent().parent().removeClass('has_error');
            $(this).nextAll(".help_msg").html("");
        });
    })
</script>
</block>
